<%@page import="java.util.HashMap"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String ID = request.getParameter("ID");
	String type = request.getParameter("type");
	int Itype;
	HashMap usertype = new HashMap();
	usertype.put(1, "学生、教师");
	usertype.put(2, "教材发行人员");
	usertype.put(3, "仓库采购人员");
	usertype.put(4, "管理员");

	try {
		Itype = Integer.parseInt(type);
	}

	catch (Exception e) {
		out.print("系统出错");
		return;
	}

%>
<script>
	function over(node) {
		$(node).css("cursor", "pointer");
	}

	function ajaxsubmit() {
	if ($('#resetPsdForm').form('validate') != true)
			return;
		AjaxSubmit2(

		"../AdminRolesChangeInfo.do?type=" + $("#usertype").attr("value")
				+ "&resetpd=" + $("#password").attr("value") + "&ID="
				+ $("#userid").attr("value"), // ajax地址

		"ajaxLoginImg2", // loading图片的id

		"重置帐号" + $("#userid").attr("value") + "密码为" + $("#password").attr("value"),

		function(msg) {
			showAlert("成功提示", msg);
			$('#win').window('close');
		},

		function(msg) {
			showAlert("失败提示", msg);
		});
	}
</script>

<form id="resetPsdForm"> 
<div style="text-align: center;">
	<table style="margin-top: 15px;margin:auto;">
		<tr style="height: 30px">
			<td colspan="2" style='text-align: center; font-size: 14px'>重置密码</td>
		</tr>
		<tr style="height: 30px">
			<td>用户名：</td>
			<td><%=ID%><input type="hidden" id="userid" value="<%=ID%>" />
			</td>
		</tr>
		<tr style="height: 30px">
			<td>用户类型:</td>
			<td><%=usertype.get(Itype)%> <input type="hidden" id="usertype"
				value="<%=type%>" />
			</td>
		</tr>

		<tr style="height: 30px">
			<td>新密码:</td>
			<td><input type="password" id="password" name="resetpd" class="easyui-validatebox" data-options="required:true,missingMessage:'不能为空'" />
			</td>
		</tr>
		<tr>
			<td colspan="2" valign="middle"><a href="javascript:void(0)" id="ajaxLoginBtn"
				class="easyui-linkbutton" onclick='ajaxsubmit();'>提交</a></td>

		</tr>
	</table>
</div>
</form>
<img src="../../images/loading.gif"
	style="display: none; height: 25px; width: 25px;" id="ajaxLoginImg2" />
